# Search Areas of Use

Search Area of Use records by keywords and/or geographic area - returning named bounding box definitions in latitude and longitude. Geographical constraints are passed (optionally) as parameters via the query URL, search keywords are passed via the request body. Query syntax follows Lucene style, default operator for multiple expressions is AND. The following keywords are supported: 'name:', 'description:', 'authority:', 'code:', 'deprecationState:', 'remarks:' (deprecationState remarks), 'lastModified:'. Example 'name:*America*'. longitudeLeft - the left WGS 84 longitude limit of the search box. latitudeLower - the lower WGS 84 latitude limit of the search box. longitudeRight - the right WGS 84 longitude limit of the search box. latitudeUpper - The upper WGS 84 latitude limit of the search box.

Endpoint: POST /search/area
Version: 2.0.0
Security: bearer

## Security:

  - `bearer` (unknown)
    http bearer JWT

## Query parameters:

  - `longitudeLeft` (number)
    The left (western) longitude of the bounding box, in decimal degrees.

  - `latitudeLower` (number)
    The lower (southern) latitude of the bounding box, in decimal degrees.

  - `longitudeRight` (number)
    The right (eastern) longitude of the bounding box, in decimal degrees.

  - `latitudeUpper` (number)
    The upper (northern) latitude of the bounding box, in decimal degrees.

  - `offset` (integer)
    The offset of the first item in the list.

  - `limit` (integer)
    The maximum number of items returned.

  - `mode` (string)
    The mode of return: 'persistable_reference' (default) string or 'essence' structure or 'persistable_reference_essence' i.e. the combination of other 2 options.

## Header parameters:

  - `data-partition-id` (string, required)
    desired data partition id

## Request body:

  - `application/json` (unknown)
    A Lucene style keyword query. One of the following keywords: 'name:', 'description:', 'authority:', 'code:', 'deprecationState:', 'remarks:' (deprecationState remarks), 'lastModified:'. Example 'name:*America*'.

## Request fields (application/json):

  - `query` (string)
    The Lucene style query string with keywords.
    Example: description:*America*

## Response 200:

  - `200` (unknown)
    A successful response

## Response 200 fields (application/json):

  - `areasOfUse` (array)
    An array of AreaOfUse

  - `areasOfUse.id` (string)
    The Internal Id of the AreaOfUse.

  - `areasOfUse.name` (string)
    The name of the AreaOfUse.

  - `areasOfUse.description` (string)
    The description of the AreaOfUse.

  - `areasOfUse.lastModified` (string)
    The LastModified of the AreaOfUse.

  - `areasOfUse.namedReference` (object)
    Name and Persistable Reference (the essence converted to a JSON string).

  - `areasOfUse.namedReference.name` (string)
    The name of the item.

  - `areasOfUse.namedReference.persistableReference` (string)
    The item 'essence' serialized into a JSON string.

  - `areasOfUse.essence` (object)
    Area of use consisting of a bounding box in latitude and longitude WGS 84.

  - `areasOfUse.essence.type` (string, required)
    The type identifier, fixed to 'AOU'.
    Enum: "AOU"

  - `areasOfUse.essence.boundBox` (object, required)
    WGS 84 bounding box in latitude longitude.

  - `areasOfUse.essence.boundBox.lonMin` (number, required)
    The left longitude limit in degrees; the longitude can wrap around the datum line.

  - `areasOfUse.essence.boundBox.lonMax` (number, required)
    The right longitude limit in degrees; the longitude can wrap around the datum line.

  - `areasOfUse.essence.boundBox.latMin` (number, required)
    The upper latitude limit in degrees.

  - `areasOfUse.essence.boundBox.latMax` (number, required)
    The lower latitude limit in degrees.

  - `areasOfUse.essence.authCode` (object)
    The AuthorityCode for this item.

  - `areasOfUse.essence.authCode.auth` (string, required)
    The name of the authority issuing the code. Usually a string but it can be NULL for transient items.
    Example: EPSG

  - `areasOfUse.essence.authCode.code` (string, required)
    The code issued by the authority. Usually a number but it can be NULL for transient items.
    Example: 4326

  - `count` (integer)
    Number of elements in the response.

  - `offset` (integer)
    Offset to the first catalog item in the response, as set in the request.

  - `totalCount` (integer)
    Number of elements in the catalog.

## Response 400:

  - `400` (unknown)
    Bad input format

## Response 400 fields (application/json):

  - `error` (string)
    Error message

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `error` (string)
    Error message

## Response 404:

  - `404` (unknown)
    Not found

## Response 404 fields (application/json):

  - `error` (string)
    Error message

